package javabase.schoolwork.day6_19;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;

/**
 * @author fance
 * @date 2018/6/19 20:34
 */
public class Client {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("localhost",8888);
        BufferedReader bufferedReader =
                new BufferedReader(new InputStreamReader(
                        socket.getInputStream()
                ));

        String s = bufferedReader.readLine();
        System.out.println(s);
        bufferedReader.close();
        socket.close();

    }
}
